<?php
namespace backend\models;

use Yii;
use yii\base\Model;
use yii\base\Exception;
use common\models\CustomerOrder;
use common\models\OrderProduct;
use common\models\TransferUndertake;
use common\models\Product;
use common\models\User;
use common\models\EmpDepart;

class OrderDetail extends Model
{
	public $suser;
	public $order_address;
	public $create_time;
	public $customer;
	public $product;
	public $purchase_time;
	public $check_time;
	public $check_address;
	public $purchase_user;
	public $realtion;
	public $out_storage_time;
	public $delivery_code;
	public $sign_time;

	//private $_orderProduct;

    public function __construct($id, $config = []) {
    	$order_product = OrderProduct::findOne($id);
    	$this->suser = $order_product->customerorder->sid;
    	$this->order_address = $order_product->order_home;
    	$this->create_time = $order_product->created_at;
    	$this->customer = $order_product->customerorder->cid;
    	$this->product = $order_product->pname;
    	$this->purchase_time = $order_product->purchase_time;
    	$this->check_time = $order_product->check_time;
    	$this->check_address = $order_product->check_address;
    	$this->purchase_user = $order_product->purchase_user;
    	$this->realtion = $order_product->relation;
    	$this->out_storage_time = $order_product->out_storage_time;
    	$this->delivery_code = $order_product->delivery_code;
    	$this->sign_time = $order_product->sign_time;

		return parent::__construct($config);
    }





}	